From eef586eadb53d89cf6c7697a834c88e42b552da7 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Tue, 2 Aug 2011 11:55:05 +0000 Subject: [PATCH] In Special:Protectedpages and Special:Protectedtitles, show protection expiry times as local times instead of UTC. --- includes/specials/SpecialProtectedpages.php | 8 ++++---- includes/specials/SpecialProtectedtitles.php | 7 ++++++- languages/messages/MessagesEn.php | 1 + languages/messages/MessagesHe.php | 3 ++- maintenance/language/messages.inc | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 19b9760aca..21451086f3 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -106,10 +106,10 @@ class SpecialProtectedpages extends SpecialPage { if( $expiry != $infinity ) { $expiry_description = wfMsg( - 'protect-expiring', - $wgLang->timeanddate( $expiry ), - $wgLang->date( $expiry ), - $wgLang->time( $expiry ) + 'protect-expiring-local', + $wgLang->timeanddate( $expiry, true ), + $wgLang->date( $expiry, true ), + $wgLang->time( $expiry, true ) ); $description_items[] = htmlspecialchars($expiry_description); diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 5fb91af7a6..40e58bc415 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -97,7 +97,12 @@ class SpecialProtectedtitles extends SpecialPage { $expiry = strlen( $row->pt_expiry ) ? $wgLang->formatExpiry( $row->pt_expiry, TS_MW ) : $infinity; if( $expiry != $infinity ) { - $expiry_description = wfMsg( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); + $expiry_description = wfMsg( + 'protect-expiring-local', + $wgLang->timeanddate( $expiry, true ), + $wgLang->date( $expiry, true ), + $wgLang->time( $expiry, true ) + ); $description_items[] = htmlspecialchars($expiry_description); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index e285e1696f..a0cc9144d6 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2875,6 +2875,7 @@ You can change this page's protection level, but it will not affect the cascadin 'protect-level-sysop' => 'Administrators only', 'protect-summary-cascade' => 'cascading', 'protect-expiring' => 'expires $1 (UTC)', +'protect-expiring-local' => 'expires $1', 'protect-expiry-indefinite' => 'indefinite', 'protect-cascade' => 'Protect pages included in this page (cascading protection)', 'protect-cantedit' => 'You cannot change the protection levels of this page, because you do not have permission to edit it.', diff --git a/languages/messages/MessagesHe.php b/languages/messages/MessagesHe.php index 0c099f0233..e4041aab63 100644 --- a/languages/messages/MessagesHe.php +++ b/languages/messages/MessagesHe.php @@ -2421,7 +2421,8 @@ $UNWATCHURL 'protect-level-sysop' => 'מפעילי מערכת בלבד', 'protect-summary-cascade' => 'מדורג', 'protect-expiring' => 'פוקעת $1 (UTC)', -'protect-expiry-indefinite' => 'בלתי מוגבל בזמן', +'protect-expiring-local' => 'פוקעת $1', +'protect-expiry-indefinite' => 'בלתי מוגבלת בזמן', 'protect-cascade' => 'הגנה על כל הדפים המוכללים בדף זה (הגנה מדורגת)', 'protect-cantedit' => 'אינכם יכולים לשנות את רמת ההגנה על דף זה, כיוון שאין לכם הרשאה לערוך אותו.', 'protect-othertime' => 'זמן אחר:', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 82b168c208..8e2618764f 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1923,6 +1923,7 @@ $wgMessageStructure = array( 'protect-level-sysop', 'protect-summary-cascade', 'protect-expiring', + 'protect-expiring-local', 'protect-expiry-indefinite', 'protect-cascade', 'protect-cantedit', -- 2.20.1